package com.zhl.study.configuration;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

/**
 * @description TODO
 * @Author: z156940l@outlook.com
 * @className TimeZoneConfig
 * @Date: 2023/4/17 22:19
 */
@Component
public class TimeZoneConfig {
    /**
     * 日志
     */
    private static final Logger logger = LoggerFactory.getLogger(TimeZoneConfig.class);

    @PostConstruct
    void started() {
        logger.info("init localtime default time zone");
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
    }
}
